import pandas as pd
# 手动创建pd数据-dict
pd_data={
    '姓名': ['Mary', 'LiLi', 'Cendy'],
    '基本薪资': [5000, 5500, 4800],
    '绩效薪资': [2000, 1500, 1800],
    '补贴': [1000, 800, 900]
}
df=pd.DataFrame(pd_data)
mary_df=df[df['姓名']=='Mary']#等同于mary_loc=df.loc[df['姓名']=='Mary']
print(f"Mary的信息: {mary_df}")
df['奖金']=[400,400,450]
df.loc[:,'年终奖']=[1000,1000,1000]
df.insert(4,'交通补贴',[400,400,450])
df.rename(columns={'姓名':'name'},inplace=True)
df.drop("年终奖",axis=1,inplace=True)
print(f"df:\n {df}")